package newapi;

import java.time.LocalDate;
import java.time.LocalTime;
import java.time.MonthDay;

public class Main {
    public static void main(String[] args) {
        LocalTime nowtime = LocalTime.now();
        LocalDate nowdate = LocalDate.now();
        System.out.println(nowtime);

        //  +
        System.out.println(nowtime.plusHours(1));
        System.out.println(nowtime.plusMinutes(1));
        System.out.println(nowtime.plusSeconds(1));
        System.out.println(nowtime.plusNanos(1));

        //  -
        System.out.println(nowtime.minusHours(1));
        System.out.println(nowtime.minusMinutes(1));
        System.out.println(nowtime.minusSeconds(1));
        System.out.println(nowtime.minusNanos(1));


        LocalDate birthday = LocalDate.of(2004,4,11) ;
        System.out.println(nowdate.isAfter(birthday));

        MonthDay birMd = MonthDay.of(birthday.getMonthValue(), birthday.getDayOfMonth());
        MonthDay nowMd = MonthDay.from(nowdate);
        System.out.println(birMd.equals(nowMd));
    }
}
